const fs = require("fs");
const path = require("path");

let dirNamePath = path.join(__dirname, "/data/座右铭.txt");

/* 同步写入 */
fs.appendFileSync(dirNamePath, "\r\n泽其善者而从之, 其不善者而改之");

fs.appendFileSync(dirNamePath, "\r\n吾日三省吾身", (err) => {
  if (err) {
    console.log("追加失败!");
    return;
  }
  console.log("追加成功!");
});
